<div class="wedgetail-form"> 
	<%= error_messages_for 'useredit' %> 

	<fieldset> 
		<legend>Change Password for <%= @useredit.full_name %></legend><p> 
			<% form_for (:useredit,:url=> {:action => 'update_password'}) do |form| %> 
			<%= form.hidden_field :wedgetail%>
			<table>
				<tr>
					<td>	<label for="user_password">New Password:</label> </td>
					<td><%= form.password_field :password, :size => 40 %> </td>
				</tr>
				<tr>
					<td><label for="user_password_confirmation">Confirm:</label> </td>
					<td><%= form.password_field :password_confirmation, :size => 40 %> </td>
				</tr>
			</table>
		</p>	
		<%= submit_tag "Change", :class => "submit" %> 
	</fieldset>
	<p><p>
	<% if @user.role==5 or (@user.role<2 and @useredit.role==5 and @useredit.wedgetail!=@user.wedgetail)%>
	<table width=100%>
		<tr>
			<td width=50% valign=top>
		<fieldset>
			<legend>Change Access Firewall for <%= @useredit.full_name %></legend><p> 
				<pre>All records are audited which means you can always see a list of everyone <br>who has looked at your record</pre>
				<%= form.radio_button :access,1%>Access to all health professionals registered with Wedgetail (default)<br>
				<%= form.radio_button :access,2%>Access to all health providers except those is selected list (blocked list)<br>
				<%= form.radio_button :access,3%>Access to only health providers in selected list(allowed list)<br>
				<%= form.radio_button :access,4%>Access to nobody except <%= @access_name %><br>

				<p>

				<%= submit_tag "Change", :class => "submit" %> 

	
		</fieldset>
		</td>
		<td width=50% valign=top>
		<%= link_to "Edit Access List",:action=>'firewall',:wedgetail=>@useredit.wedgetail%><p>
		<%= render(:partial => "firewall_current") %>
		</td>
		</tr>
		</table>
	
	<% end %>
	<% end %>
</div>
<%= link_to "Back ", :controller=> :patients, :action=> :show, :id=>@useredit.wedgetail %>
